package servico;

import java.io.Serializable;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.SequenceGenerator;
import javax.persistence.Table;

@Entity
@Table(name = "Item_mat")
@SequenceGenerator( name = "ITMAT_ID", sequenceName = "ITMAT_SEQ", allocationSize = 1 )
public class Item_mat implements Serializable
{
	/**
	 * 
	 */
	private static final long serialVersionUID = 1L;
	@Id
	@Column(name = "cod_item")
	@GeneratedValue( strategy = GenerationType.IDENTITY, generator = "ITMAT_ID" ) 
	private int cod_item;
	@Column(name = "cod_mat")
	private int cod_mat;
	@Column(name = "cod_serv")
	private int cod_serv;
	@ManyToOne  
	@JoinColumn(name = "servMat") 
	private EntidadeServico servMat;
	
	public int getCod_item() {
		return cod_item;
	}
	public void setCod_item(int cod_item) {
		this.cod_item = cod_item;
	}
	public int getCod_mat() {
		return cod_mat;
	}
	public void setCod_mat(int cod_mat) {
		this.cod_mat = cod_mat;
	}
	public int getCod_serv() {
		return cod_serv;
	}
	public void setCod_serv(int cod_serv) {
		this.cod_serv = cod_serv;
	}
	public EntidadeServico getServMat() {
		return servMat;
	}
	public void setServMat(EntidadeServico servMat) {
		this.servMat = servMat;
	}
	
	
}
